package com.mfangsoft.zhuangjialong.integration.usermanage.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.mfangsoft.zhuangjialong.common.model.Page;
import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;
import com.mfangsoft.zhuangjialong.integration.usermanage.model.CustomerUserManagerCommunicate;
@WriterRepository
public interface CustomerUserManagerCommunicateMapper {
    /**
     * 通过主键删除  
     *
     * @MLTH_generated
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 插入数据  
     *
     * @MLTH_generated
     */
    int insert(CustomerUserManagerCommunicate record);

    int insertSelective(CustomerUserManagerCommunicate record);

    /**
     * 通过主键查询数据 
     *
     * @MLTH_generated
     */
    CustomerUserManagerCommunicate selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CustomerUserManagerCommunicate record);

    /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
    int updateByPrimaryKey(CustomerUserManagerCommunicate record);
    /**
     * 根据消费者id和导购id查看沟通记录
     * @param page
     * @return
     */
	CustomerUserManagerCommunicate selectRelatedCustomerCommunicate(
			Map<String,Object> map);

	/**
	 * 增加沟通记录基本表的查看
	 * @param customerCommunicateEntity
	 */
	CustomerUserManagerCommunicate selectCustomerUserManagerCommunicate(CustomerUserManagerCommunicate customerCommunicateEntity);

	/**
	 * 查看沟通记录的最后一个状态
	 * @param customer_id
	 * @param userManager_id
	 * @return
	 */
	Long selectLastState(@Param(value = "customer_id") Long customer_id, @Param(value = "userManager_id") Long userManager_id);

	  /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
	int updateByPrimaryKeySelective1(CustomerUserManagerCommunicate customerCommunicateEntity);

}